package com.fm.openinstall.a;

import android.net.*;
import com.fm.openinstall.b.*;
import java.util.concurrent.*;
import com.fm.openinstall.f.*;
import com.fm.openinstall.c.*;
import java.util.*;

class m extends s
{
    final /* synthetic */ Uri a;
    final /* synthetic */ a b;
    final /* synthetic */ f c;

    m(final f c, final ExecutorService executorService, final q q, final long n, final Uri a, final a b) {
        this.c = c;
        this.a = a;
        this.b = b;
        super(executorService, q, n);
    }

    @Override
    public b a(final long n) {
        b a;
        if ((a = this.c.a(n)) == null) {
            final Uri a2 = this.a;
            Map<String, String> a3 = null;
            Label_0077: {
                b b4 = null;
                Label_0053: {
                    if (a2 != null) {
                        final List pathSegments = a2.getPathSegments();
                        if (pathSegments != null && pathSegments.size() > 0) {
                            if (pathSegments.get(0).equalsIgnoreCase("c")) {
                                if (pathSegments.size() > 1) {
                                    final String b = com.fm.openinstall.f.e.b(pathSegments.get(1));
                                    final b b2 = new b(com.fm.openinstall.c.c.a, 1);
                                    b2.c(b);
                                    return b2;
                                }
                                final b b3 = new b(com.fm.openinstall.c.c.a, 1);
                                b3.c("");
                                return b3;
                            }
                            else if (pathSegments.get(0).equalsIgnoreCase("h")) {
                                if (!com.fm.openinstall.c.d.a(this.c.k)) {
                                    b4 = new b(com.fm.openinstall.c.c.b, -10);
                                    break Label_0053;
                                }
                                a3 = new HashMap<String, String>();
                                a3.put("wakeupUrl", this.a.toString());
                                break Label_0077;
                            }
                            else {
                                a = new b(com.fm.openinstall.c.c.a, 1);
                            }
                        }
                        else {
                            a = new b(com.fm.openinstall.c.c.a, 1);
                        }
                        a.b("The wakeup parameter is invalid");
                        return a;
                    }
                    if (com.fm.openinstall.c.d.a(this.c.k)) {
                        a3 = (Map<String, String>)com.fm.openinstall.a.d.a();
                        this.c.a(a3, this.b);
                        break Label_0077;
                    }
                    b4 = new b(com.fm.openinstall.c.c.b, -10);
                }
                b4.b("network unavailable");
                return b4;
            }
            final com.fm.openinstall.c.a b5 = this.c.b();
            final String a4 = this.c.a("decode-wakeup-url");
            final f c = this.c;
            final b a5 = b5.a(a4, c.a(c.k), a3);
            this.c.b(a5.e());
            return a5;
        }
        return a;
    }
}
